/*
* Copyright (C) 1997-2001 Id Software, Inc.
* 
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE.
* 
* See the GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place - Suite 330, Boston, MA 02111-1307, USA.
*  
*/

// Created on 13.11.2003 by RST.
// $Id: M_Medic.java,v 1.4 2005/11/20 22:18:33 salomo Exp $
using System;
using Defines = Suake2.UI.Defines;
using Suake2.UI.game;
using Lib = Suake2.UI.util.Lib;
using Math3D = Suake2.UI.util.Math3D;
namespace Suake2.UI.game.monsters
{
	
	public class M_Medic
	{
		public M_Medic()
		{
			InitBlock();
		}
		public class AnonymousClassEntThinkAdapter:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_idle";
				}
				
			}
			public override bool think(edict_t self)
			{
				edict_t ent;
				
				GameBase.gi.sound(self, Defines.CHAN_VOICE, jake2.game.monsters.M_Medic.sound_idle1, 1, Defines.ATTN_IDLE, 0);
				
				ent = Suake2.UI.game.monsters.M_Medic.medic_FindDeadMonster(self);
				if (ent != null)
				{
					self.enemy = ent;
					self.enemy.owner = self;
					self.monsterinfo.aiflags |= Defines.AI_MEDIC;
					GameUtil.FoundTarget(self);
				}
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter1:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_search";
				}
				
			}
			public override bool think(edict_t self)
			{
				edict_t ent;
				
				GameBase.gi.sound(self, Defines.CHAN_VOICE, jake2.game.monsters.M_Medic.sound_search, 1, Defines.ATTN_IDLE, 0);
				
				if (self.oldenemy == null)
				{
					ent = Suake2.UI.game.monsters.M_Medic.medic_FindDeadMonster(self);
					if (ent != null)
					{
						self.oldenemy = self.enemy;
						self.enemy = ent;
						self.enemy.owner = self;
						self.monsterinfo.aiflags |= Defines.AI_MEDIC;
						GameUtil.FoundTarget(self);
					}
				}
				return true;
			}
		}
		public class AnonymousClassEntInteractAdapter:EntInteractAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_sight";
				}
				
			}
			public override bool interact(edict_t self, edict_t other)
			{
				GameBase.gi.sound(self, Defines.CHAN_VOICE, jake2.game.monsters.M_Medic.sound_sight, 1, Defines.ATTN_NORM, 0);
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter2:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_stand";
				}
				
			}
			public override bool think(edict_t self)
			{
				self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Medic.medic_move_stand;
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter3:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_walk";
				}
				
			}
			public override bool think(edict_t self)
			{
				self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Medic.medic_move_walk;
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter4:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_run";
				}
				
			}
			public override bool think(edict_t self)
			{
				if (0 == (self.monsterinfo.aiflags & Defines.AI_MEDIC))
				{
					edict_t ent;
					
					ent = Suake2.UI.game.monsters.M_Medic.medic_FindDeadMonster(self);
					if (ent != null)
					{
						self.oldenemy = self.enemy;
						self.enemy = ent;
						self.enemy.owner = self;
						self.monsterinfo.aiflags |= Defines.AI_MEDIC;
						GameUtil.FoundTarget(self);
						return true;
					}
				}
				
				if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0)
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Medic.medic_move_stand;
				else
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Medic.medic_move_run;
				return true;
			}
		}
		public class AnonymousClassEntPainAdapter:EntPainAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_pain";
				}
				
			}
			public override void  pain(edict_t self, edict_t other, float kick, int damage)
			{
				
				if (self.health < (self.max_health / 2))
					self.s.skinnum = 1;
				
				if (GameBase.level.time < self.pain_debounce_time)
					return ;
				
				self.pain_debounce_time = GameBase.level.time + 3;
				
				if (GameBase.skill.value_Renamed == 3)
					return ; // no pain anims in nightmare
				
				if (Lib.random() < 0.5)
				{
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Medic.medic_move_pain1;
					GameBase.gi.sound(self, Defines.CHAN_VOICE, jake2.game.monsters.M_Medic.sound_pain1, 1, Defines.ATTN_NORM, 0);
				}
				else
				{
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Medic.medic_move_pain2;
					GameBase.gi.sound(self, Defines.CHAN_VOICE, jake2.game.monsters.M_Medic.sound_pain2, 1, Defines.ATTN_NORM, 0);
				}
			}
		}
		public class AnonymousClassEntThinkAdapter5:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_fire_blaster";
				}
				
			}
			public override bool think(edict_t self)
			{
				float[] start = new float[]{0, 0, 0};
				float[] forward = new float[]{0, 0, 0}, right = new float[]{0, 0, 0};
				float[] end = new float[]{0, 0, 0};
				float[] dir = new float[]{0, 0, 0};
				int effect;
				
				if ((self.s.frame == jake2.game.monsters.M_Medic.FRAME_attack9) || (self.s.frame == jake2.game.monsters.M_Medic.FRAME_attack12))
					effect = Defines.EF_BLASTER;
				else if ((self.s.frame == jake2.game.monsters.M_Medic.FRAME_attack19) || (self.s.frame == jake2.game.monsters.M_Medic.FRAME_attack22) || (self.s.frame == jake2.game.monsters.M_Medic.FRAME_attack25) || (self.s.frame == jake2.game.monsters.M_Medic.FRAME_attack28))
					effect = Defines.EF_HYPERBLASTER;
				else
					effect = 0;
				
				Math3D.AngleVectors(self.s.angles, forward, right, null);
				Math3D.G_ProjectSource(self.s.origin, M_Flash.monster_flash_offset[Defines.MZ2_MEDIC_BLASTER_1], forward, right, start);
				
				Math3D.VectorCopy(self.enemy.s.origin, end);
				end[2] += self.enemy.viewheight;
				Math3D.VectorSubtract(end, start, dir);
				
				Monster.monster_fire_blaster(self, start, dir, 2, 1000, Defines.MZ2_MEDIC_BLASTER_1, effect);
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter6:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_dead";
				}
				
			}
			public override bool think(edict_t self)
			{
				Math3D.VectorSet(self.mins, - 16, - 16, - 24);
				Math3D.VectorSet(self.maxs, 16, 16, - 8);
				self.movetype = Defines.MOVETYPE_TOSS;
				self.svflags |= Defines.SVF_DEADMONSTER;
				self.nextthink = 0;
				GameBase.gi.linkentity(self);
				return true;
			}
		}
		public class AnonymousClassEntDieAdapter:EntDieAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_die";
				}
				
			}
			public override void  die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point)
			{
				
				int n;
				
				// if we had a pending patient, free him up for another medic
				if ((self.enemy != null) && (self.enemy.owner == self))
					self.enemy.owner = null;
				
				//	check for gib
				if (self.health <= self.gib_health)
				{
					GameBase.gi.sound(self, Defines.CHAN_VOICE, GameBase.gi.soundindex("misc/udeath.wav"), 1, Defines.ATTN_NORM, 0);
					for (n = 0; n < 2; n++)
						GameMisc.ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, Defines.GIB_ORGANIC);
					for (n = 0; n < 4; n++)
						GameMisc.ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, Defines.GIB_ORGANIC);
					GameMisc.ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, Defines.GIB_ORGANIC);
					self.deadflag = Defines.DEAD_DEAD;
					return ;
				}
				
				if (self.deadflag == Defines.DEAD_DEAD)
					return ;
				
				//	regular death
				GameBase.gi.sound(self, Defines.CHAN_VOICE, jake2.game.monsters.M_Medic.sound_die, 1, Defines.ATTN_NORM, 0);
				self.deadflag = Defines.DEAD_DEAD;
				self.takedamage = Defines.DAMAGE_YES;
				
				self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Medic.medic_move_death;
			}
		}
		public class AnonymousClassEntThinkAdapter7:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_duck_down";
				}
				
			}
			public override bool think(edict_t self)
			{
				if ((self.monsterinfo.aiflags & Defines.AI_DUCKED) != 0)
					return true;
				self.monsterinfo.aiflags |= Defines.AI_DUCKED;
				self.maxs[2] -= 32;
				self.takedamage = Defines.DAMAGE_YES;
				self.monsterinfo.pausetime = GameBase.level.time + 1;
				GameBase.gi.linkentity(self);
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter8:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_duck_hold";
				}
				
			}
			public override bool think(edict_t self)
			{
				if (GameBase.level.time >= self.monsterinfo.pausetime)
					self.monsterinfo.aiflags &= ~ Defines.AI_HOLD_FRAME;
				else
					self.monsterinfo.aiflags |= Defines.AI_HOLD_FRAME;
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter9:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_duck_up";
				}
				
			}
			public override bool think(edict_t self)
			{
				self.monsterinfo.aiflags &= ~ Defines.AI_DUCKED;
				self.maxs[2] += 32;
				self.takedamage = Defines.DAMAGE_AIM;
				GameBase.gi.linkentity(self);
				return true;
			}
		}
		public class AnonymousClassEntDodgeAdapter:EntDodgeAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_dodge";
				}
				
			}
			public override void  dodge(edict_t self, edict_t attacker, float eta)
			{
				if (Lib.random() > 0.25)
					return ;
				
				if (self.enemy == null)
					self.enemy = attacker;
				
				self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Medic.medic_move_duck;
			}
		}
		public class AnonymousClassEntThinkAdapter10:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_continue";
				}
				
			}
			public override bool think(edict_t self)
			{
				if (GameUtil.visible(self, self.enemy))
					if (Lib.random() <= 0.95)
						self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Medic.medic_move_attackHyperBlaster;
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter11:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_hook_launch";
				}
				
			}
			public override bool think(edict_t self)
			{
				GameBase.gi.sound(self, Defines.CHAN_WEAPON, jake2.game.monsters.M_Medic.sound_hook_launch, 1, Defines.ATTN_NORM, 0);
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter12:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_cable_attack";
				}
				
			}
			public override bool think(edict_t self)
			{
				float[] offset = new float[]{0, 0, 0}, start = new float[]{0, 0, 0}, end = new float[]{0, 0, 0}, f = new float[]{0, 0, 0}, r = new float[]{0, 0, 0};
				trace_t tr;
				float[] dir = new float[]{0, 0, 0}, angles = new float[]{0, 0, 0};
				float distance;
				
				if (!self.enemy.inuse)
					return true;
				
				Math3D.AngleVectors(self.s.angles, f, r, null);
				Math3D.VectorCopy(jake2.game.monsters.M_Medic.medic_cable_offsets[self.s.frame - jake2.game.monsters.M_Medic.FRAME_attack42], offset);
				Math3D.G_ProjectSource(self.s.origin, offset, f, r, start);
				
				// check for max distance
				Math3D.VectorSubtract(start, self.enemy.s.origin, dir);
				distance = Math3D.VectorLength(dir);
				if (distance > 256)
					return true;
				
				// check for min/max pitch
				Math3D.vectoangles(dir, angles);
				if (angles[0] < - 180)
					angles[0] += 360;
				if (System.Math.Abs(angles[0]) > 45)
					return true;
				
				tr = GameBase.gi.trace(start, null, null, self.enemy.s.origin, self, Defines.MASK_SHOT);
				if (tr.fraction != 1.0 && tr.ent != self.enemy)
					return true;
				
				if (self.s.frame == jake2.game.monsters.M_Medic.FRAME_attack43)
				{
					GameBase.gi.sound(self.enemy, Defines.CHAN_AUTO, jake2.game.monsters.M_Medic.sound_hook_hit, 1, Defines.ATTN_NORM, 0);
					self.enemy.monsterinfo.aiflags |= Defines.AI_RESURRECTING;
				}
				else if (self.s.frame == jake2.game.monsters.M_Medic.FRAME_attack50)
				{
					self.enemy.spawnflags = 0;
					self.enemy.monsterinfo.aiflags = 0;
					self.enemy.target = null;
					self.enemy.targetname = null;
					self.enemy.combattarget = null;
					self.enemy.deathtarget = null;
					self.enemy.owner = self;
					GameSpawn.ED_CallSpawn(self.enemy);
					self.enemy.owner = null;
					if (self.enemy.think != null)
					{
						self.enemy.nextthink = GameBase.level.time;
						self.enemy.think.think(self.enemy);
					}
					self.enemy.monsterinfo.aiflags |= Defines.AI_RESURRECTING;
					if (self.oldenemy != null && self.oldenemy.client != null)
					{
						self.enemy.enemy = self.oldenemy;
						GameUtil.FoundTarget(self.enemy);
					}
				}
				else
				{
					if (self.s.frame == jake2.game.monsters.M_Medic.FRAME_attack44)
						GameBase.gi.sound(self, Defines.CHAN_WEAPON, jake2.game.monsters.M_Medic.sound_hook_heal, 1, Defines.ATTN_NORM, 0);
				}
				
				// adjust start for beam origin being in middle of a segment
				Math3D.VectorMA(start, 8, f, start);
				
				// adjust end z for end spot since the monster is currently dead
				Math3D.VectorCopy(self.enemy.s.origin, end);
				end[2] = self.enemy.absmin[2] + self.enemy.size[2] / 2;
				
				GameBase.gi.WriteByte(Defines.svc_temp_entity);
				GameBase.gi.WriteByte(Defines.TE_MEDIC_CABLE_ATTACK);
				GameBase.gi.WriteShort(self.index);
				GameBase.gi.WritePosition(start);
				GameBase.gi.WritePosition(end);
				GameBase.gi.multicast(self.s.origin, Defines.MULTICAST_PVS);
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter13:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_hook_retract";
				}
				
			}
			public override bool think(edict_t self)
			{
				GameBase.gi.sound(self, Defines.CHAN_WEAPON, jake2.game.monsters.M_Medic.sound_hook_retract, 1, Defines.ATTN_NORM, 0);
				self.enemy.monsterinfo.aiflags &= ~ Defines.AI_RESURRECTING;
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter14:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_attack";
				}
				
			}
			public override bool think(edict_t self)
			{
				if ((self.monsterinfo.aiflags & Defines.AI_MEDIC) != 0)
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Medic.medic_move_attackCable;
				else
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Medic.medic_move_attackBlaster;
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter15:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "medic_checkattack";
				}
				
			}
			public override bool think(edict_t self)
			{
				if ((self.monsterinfo.aiflags & Defines.AI_MEDIC) != 0)
				{
					jake2.game.monsters.M_Medic.medic_attack.think(self);
					return true;
				}
				
				return GameUtil.M_CheckAttack.think(self);
			}
		}
		private void  InitBlock()
		{
			medic_frames_stand = new mframe_t[]{new mframe_t(GameAI.ai_stand, 0, medic_idle), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand
				, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null)};
			medic_frames_walk = new mframe_t[]{new mframe_t(GameAI.ai_walk_Renamed_Field, 6.2f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 18.1f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 1, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 9, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 10, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 9, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 11, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 11.6f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 9.9f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 14, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 9.3f, null)};
			medic_frames_run = new mframe_t[]{new mframe_t(GameAI.ai_run, 18, null), new mframe_t(GameAI.ai_run, 22.5f, null), new mframe_t(GameAI.ai_run, 25.4f, null), new mframe_t(GameAI.ai_run, 23.4f, null), new mframe_t(GameAI.ai_run, 24, null), new mframe_t(GameAI.ai_run, 35.6f, null)};
			medic_frames_pain1 = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null)};
			medic_frames_pain2 = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null)};
			medic_frames_death = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null)};
			medic_frames_duck = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, medic_duck_down), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, medic_duck_hold), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, medic_duck_up), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1, null)};
			medic_frames_attackHyperBlaster = new mframe_t[]{new mframe_t(GameAI.ai_charge, 0, null), new mframe_t(GameAI.ai_charge, 0, null), new mframe_t(GameAI.ai_charge, 0, null), new mframe_t(GameAI.ai_charge, 0, null), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster)};
			medic_frames_attackCable = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 2, null), new mframe_t(GameAI.ai_move_Renamed_Field, 3, null), new mframe_t(GameAI.ai_move_Renamed_Field, 5, null), new mframe_t(GameAI.ai_move_Renamed_Field, 4.4f, null), new mframe_t(GameAI.ai_charge, 4.7f, null), new mframe_t(GameAI.ai_charge, 5, null), new mframe_t(GameAI.ai_charge, 6, null), new mframe_t(GameAI.ai_charge, 4, null), new mframe_t(GameAI.ai_charge, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, medic_hook_launch), new mframe_t(GameAI.ai_move_Renamed_Field, 0, medic_cable_attack), new mframe_t(GameAI.ai_move_Renamed_Field, 0, medic_cable_attack), new mframe_t(GameAI.ai_move_Renamed_Field, 0, medic_cable_attack), new mframe_t(GameAI.ai_move_Renamed_Field, 0, medic_cable_attack), new mframe_t(GameAI.ai_move_Renamed_Field, 0, medic_cable_attack), new mframe_t(GameAI.ai_move_Renamed_Field, 0, medic_cable_attack), new mframe_t(GameAI.ai_move_Renamed_Field, 0, medic_cable_attack), new mframe_t(GameAI.ai_move_Renamed_Field, 0, medic_cable_attack), new mframe_t(GameAI.ai_move_Renamed_Field, 0, medic_cable_attack), new mframe_t(GameAI.ai_move_Renamed_Field, - 15, medic_hook_retract), new mframe_t(GameAI.ai_move_Renamed_Field, - 1.5f, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1.2f, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 3, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 2, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0.3f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0.7f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 1.2f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 1.3f, null)};
		}
		//	This file generated by ModelGen - Do NOT Modify
		
		public const int FRAME_walk1 = 0;
		
		public const int FRAME_walk2 = 1;
		
		public const int FRAME_walk3 = 2;
		
		public const int FRAME_walk4 = 3;
		
		public const int FRAME_walk5 = 4;
		
		public const int FRAME_walk6 = 5;
		
		public const int FRAME_walk7 = 6;
		
		public const int FRAME_walk8 = 7;
		
		public const int FRAME_walk9 = 8;
		
		public const int FRAME_walk10 = 9;
		
		public const int FRAME_walk11 = 10;
		
		public const int FRAME_walk12 = 11;
		
		public const int FRAME_wait1 = 12;
		
		public const int FRAME_wait2 = 13;
		
		public const int FRAME_wait3 = 14;
		
		public const int FRAME_wait4 = 15;
		
		public const int FRAME_wait5 = 16;
		
		public const int FRAME_wait6 = 17;
		
		public const int FRAME_wait7 = 18;
		
		public const int FRAME_wait8 = 19;
		
		public const int FRAME_wait9 = 20;
		
		public const int FRAME_wait10 = 21;
		
		public const int FRAME_wait11 = 22;
		
		public const int FRAME_wait12 = 23;
		
		public const int FRAME_wait13 = 24;
		
		public const int FRAME_wait14 = 25;
		
		public const int FRAME_wait15 = 26;
		
		public const int FRAME_wait16 = 27;
		
		public const int FRAME_wait17 = 28;
		
		public const int FRAME_wait18 = 29;
		
		public const int FRAME_wait19 = 30;
		
		public const int FRAME_wait20 = 31;
		
		public const int FRAME_wait21 = 32;
		
		public const int FRAME_wait22 = 33;
		
		public const int FRAME_wait23 = 34;
		
		public const int FRAME_wait24 = 35;
		
		public const int FRAME_wait25 = 36;
		
		public const int FRAME_wait26 = 37;
		
		public const int FRAME_wait27 = 38;
		
		public const int FRAME_wait28 = 39;
		
		public const int FRAME_wait29 = 40;
		
		public const int FRAME_wait30 = 41;
		
		public const int FRAME_wait31 = 42;
		
		public const int FRAME_wait32 = 43;
		
		public const int FRAME_wait33 = 44;
		
		public const int FRAME_wait34 = 45;
		
		public const int FRAME_wait35 = 46;
		
		public const int FRAME_wait36 = 47;
		
		public const int FRAME_wait37 = 48;
		
		public const int FRAME_wait38 = 49;
		
		public const int FRAME_wait39 = 50;
		
		public const int FRAME_wait40 = 51;
		
		public const int FRAME_wait41 = 52;
		
		public const int FRAME_wait42 = 53;
		
		public const int FRAME_wait43 = 54;
		
		public const int FRAME_wait44 = 55;
		
		public const int FRAME_wait45 = 56;
		
		public const int FRAME_wait46 = 57;
		
		public const int FRAME_wait47 = 58;
		
		public const int FRAME_wait48 = 59;
		
		public const int FRAME_wait49 = 60;
		
		public const int FRAME_wait50 = 61;
		
		public const int FRAME_wait51 = 62;
		
		public const int FRAME_wait52 = 63;
		
		public const int FRAME_wait53 = 64;
		
		public const int FRAME_wait54 = 65;
		
		public const int FRAME_wait55 = 66;
		
		public const int FRAME_wait56 = 67;
		
		public const int FRAME_wait57 = 68;
		
		public const int FRAME_wait58 = 69;
		
		public const int FRAME_wait59 = 70;
		
		public const int FRAME_wait60 = 71;
		
		public const int FRAME_wait61 = 72;
		
		public const int FRAME_wait62 = 73;
		
		public const int FRAME_wait63 = 74;
		
		public const int FRAME_wait64 = 75;
		
		public const int FRAME_wait65 = 76;
		
		public const int FRAME_wait66 = 77;
		
		public const int FRAME_wait67 = 78;
		
		public const int FRAME_wait68 = 79;
		
		public const int FRAME_wait69 = 80;
		
		public const int FRAME_wait70 = 81;
		
		public const int FRAME_wait71 = 82;
		
		public const int FRAME_wait72 = 83;
		
		public const int FRAME_wait73 = 84;
		
		public const int FRAME_wait74 = 85;
		
		public const int FRAME_wait75 = 86;
		
		public const int FRAME_wait76 = 87;
		
		public const int FRAME_wait77 = 88;
		
		public const int FRAME_wait78 = 89;
		
		public const int FRAME_wait79 = 90;
		
		public const int FRAME_wait80 = 91;
		
		public const int FRAME_wait81 = 92;
		
		public const int FRAME_wait82 = 93;
		
		public const int FRAME_wait83 = 94;
		
		public const int FRAME_wait84 = 95;
		
		public const int FRAME_wait85 = 96;
		
		public const int FRAME_wait86 = 97;
		
		public const int FRAME_wait87 = 98;
		
		public const int FRAME_wait88 = 99;
		
		public const int FRAME_wait89 = 100;
		
		public const int FRAME_wait90 = 101;
		
		public const int FRAME_run1 = 102;
		
		public const int FRAME_run2 = 103;
		
		public const int FRAME_run3 = 104;
		
		public const int FRAME_run4 = 105;
		
		public const int FRAME_run5 = 106;
		
		public const int FRAME_run6 = 107;
		
		public const int FRAME_paina1 = 108;
		
		public const int FRAME_paina2 = 109;
		
		public const int FRAME_paina3 = 110;
		
		public const int FRAME_paina4 = 111;
		
		public const int FRAME_paina5 = 112;
		
		public const int FRAME_paina6 = 113;
		
		public const int FRAME_paina7 = 114;
		
		public const int FRAME_paina8 = 115;
		
		public const int FRAME_painb1 = 116;
		
		public const int FRAME_painb2 = 117;
		
		public const int FRAME_painb3 = 118;
		
		public const int FRAME_painb4 = 119;
		
		public const int FRAME_painb5 = 120;
		
		public const int FRAME_painb6 = 121;
		
		public const int FRAME_painb7 = 122;
		
		public const int FRAME_painb8 = 123;
		
		public const int FRAME_painb9 = 124;
		
		public const int FRAME_painb10 = 125;
		
		public const int FRAME_painb11 = 126;
		
		public const int FRAME_painb12 = 127;
		
		public const int FRAME_painb13 = 128;
		
		public const int FRAME_painb14 = 129;
		
		public const int FRAME_painb15 = 130;
		
		public const int FRAME_duck1 = 131;
		
		public const int FRAME_duck2 = 132;
		
		public const int FRAME_duck3 = 133;
		
		public const int FRAME_duck4 = 134;
		
		public const int FRAME_duck5 = 135;
		
		public const int FRAME_duck6 = 136;
		
		public const int FRAME_duck7 = 137;
		
		public const int FRAME_duck8 = 138;
		
		public const int FRAME_duck9 = 139;
		
		public const int FRAME_duck10 = 140;
		
		public const int FRAME_duck11 = 141;
		
		public const int FRAME_duck12 = 142;
		
		public const int FRAME_duck13 = 143;
		
		public const int FRAME_duck14 = 144;
		
		public const int FRAME_duck15 = 145;
		
		public const int FRAME_duck16 = 146;
		
		public const int FRAME_death1 = 147;
		
		public const int FRAME_death2 = 148;
		
		public const int FRAME_death3 = 149;
		
		public const int FRAME_death4 = 150;
		
		public const int FRAME_death5 = 151;
		
		public const int FRAME_death6 = 152;
		
		public const int FRAME_death7 = 153;
		
		public const int FRAME_death8 = 154;
		
		public const int FRAME_death9 = 155;
		
		public const int FRAME_death10 = 156;
		
		public const int FRAME_death11 = 157;
		
		public const int FRAME_death12 = 158;
		
		public const int FRAME_death13 = 159;
		
		public const int FRAME_death14 = 160;
		
		public const int FRAME_death15 = 161;
		
		public const int FRAME_death16 = 162;
		
		public const int FRAME_death17 = 163;
		
		public const int FRAME_death18 = 164;
		
		public const int FRAME_death19 = 165;
		
		public const int FRAME_death20 = 166;
		
		public const int FRAME_death21 = 167;
		
		public const int FRAME_death22 = 168;
		
		public const int FRAME_death23 = 169;
		
		public const int FRAME_death24 = 170;
		
		public const int FRAME_death25 = 171;
		
		public const int FRAME_death26 = 172;
		
		public const int FRAME_death27 = 173;
		
		public const int FRAME_death28 = 174;
		
		public const int FRAME_death29 = 175;
		
		public const int FRAME_death30 = 176;
		
		public const int FRAME_attack1 = 177;
		
		public const int FRAME_attack2 = 178;
		
		public const int FRAME_attack3 = 179;
		
		public const int FRAME_attack4 = 180;
		
		public const int FRAME_attack5 = 181;
		
		public const int FRAME_attack6 = 182;
		
		public const int FRAME_attack7 = 183;
		
		public const int FRAME_attack8 = 184;
		
		public const int FRAME_attack9 = 185;
		
		public const int FRAME_attack10 = 186;
		
		public const int FRAME_attack11 = 187;
		
		public const int FRAME_attack12 = 188;
		
		public const int FRAME_attack13 = 189;
		
		public const int FRAME_attack14 = 190;
		
		public const int FRAME_attack15 = 191;
		
		public const int FRAME_attack16 = 192;
		
		public const int FRAME_attack17 = 193;
		
		public const int FRAME_attack18 = 194;
		
		public const int FRAME_attack19 = 195;
		
		public const int FRAME_attack20 = 196;
		
		public const int FRAME_attack21 = 197;
		
		public const int FRAME_attack22 = 198;
		
		public const int FRAME_attack23 = 199;
		
		public const int FRAME_attack24 = 200;
		
		public const int FRAME_attack25 = 201;
		
		public const int FRAME_attack26 = 202;
		
		public const int FRAME_attack27 = 203;
		
		public const int FRAME_attack28 = 204;
		
		public const int FRAME_attack29 = 205;
		
		public const int FRAME_attack30 = 206;
		
		public const int FRAME_attack31 = 207;
		
		public const int FRAME_attack32 = 208;
		
		public const int FRAME_attack33 = 209;
		
		public const int FRAME_attack34 = 210;
		
		public const int FRAME_attack35 = 211;
		
		public const int FRAME_attack36 = 212;
		
		public const int FRAME_attack37 = 213;
		
		public const int FRAME_attack38 = 214;
		
		public const int FRAME_attack39 = 215;
		
		public const int FRAME_attack40 = 216;
		
		public const int FRAME_attack41 = 217;
		
		public const int FRAME_attack42 = 218;
		
		public const int FRAME_attack43 = 219;
		
		public const int FRAME_attack44 = 220;
		
		public const int FRAME_attack45 = 221;
		
		public const int FRAME_attack46 = 222;
		
		public const int FRAME_attack47 = 223;
		
		public const int FRAME_attack48 = 224;
		
		public const int FRAME_attack49 = 225;
		
		public const int FRAME_attack50 = 226;
		
		public const int FRAME_attack51 = 227;
		
		public const int FRAME_attack52 = 228;
		
		public const int FRAME_attack53 = 229;
		
		public const int FRAME_attack54 = 230;
		
		public const int FRAME_attack55 = 231;
		
		public const int FRAME_attack56 = 232;
		
		public const int FRAME_attack57 = 233;
		
		public const int FRAME_attack58 = 234;
		
		public const int FRAME_attack59 = 235;
		
		public const int FRAME_attack60 = 236;
		
		public const float MODEL_SCALE = 1.000000f;
		
		internal static int sound_idle1;
		
		internal static int sound_pain1;
		
		internal static int sound_pain2;
		
		internal static int sound_die;
		
		internal static int sound_sight;
		
		internal static int sound_search;
		
		internal static int sound_hook_launch;
		
		internal static int sound_hook_hit;
		
		internal static int sound_hook_heal;
		
		internal static int sound_hook_retract;
		
		internal static edict_t medic_FindDeadMonster(edict_t self)
		{
			edict_t ent = null;
			edict_t best = null;
			EdictIterator edit = null;
			
			while ((edit = GameBase.findradius(edit, self.s.origin, 1024)) != null)
			{
				ent = edit.o;
				if (ent == self)
					continue;
				if (0 == (ent.svflags & Defines.SVF_MONSTER))
					continue;
				if ((ent.monsterinfo.aiflags & Defines.AI_GOOD_GUY) != 0)
					continue;
				if (ent.owner == null)
					continue;
				if (ent.health > 0)
					continue;
				if (ent.nextthink == 0)
					continue;
				if (!GameUtil.visible(self, ent))
					continue;
				if (best == null)
				{
					best = ent;
					continue;
				}
				if (ent.max_health <= best.max_health)
					continue;
				best = ent;
			}
			
			return best;
		}
		
		//UPGRADE_NOTE: The initialization of  'medic_idle' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_idle;
		
		//UPGRADE_NOTE: The initialization of  'medic_search' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_search;
		
		//UPGRADE_NOTE: The initialization of  'medic_sight' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntInteractAdapter medic_sight;
		
		//UPGRADE_NOTE: The initialization of  'medic_frames_stand' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] medic_frames_stand;
		
		internal static mmove_t medic_move_stand = new mmove_t(FRAME_wait1, FRAME_wait90, medic_frames_stand, null);
		
		//UPGRADE_NOTE: The initialization of  'medic_stand' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_stand;
		
		//UPGRADE_NOTE: The initialization of  'medic_frames_walk' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] medic_frames_walk;
		
		internal static mmove_t medic_move_walk = new mmove_t(FRAME_walk1, FRAME_walk12, medic_frames_walk, null);
		
		//UPGRADE_NOTE: The initialization of  'medic_walk' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_walk;
		
		//UPGRADE_NOTE: The initialization of  'medic_frames_run' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] medic_frames_run;
		
		internal static mmove_t medic_move_run = new mmove_t(FRAME_run1, FRAME_run6, medic_frames_run, null);
		
		//UPGRADE_NOTE: The initialization of  'medic_run' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_run;
		
		//UPGRADE_NOTE: The initialization of  'medic_frames_pain1' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] medic_frames_pain1;
		
		internal static mmove_t medic_move_pain1 = new mmove_t(FRAME_paina1, FRAME_paina8, medic_frames_pain1, medic_run);
		
		//UPGRADE_NOTE: The initialization of  'medic_frames_pain2' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] medic_frames_pain2;
		
		internal static mmove_t medic_move_pain2 = new mmove_t(FRAME_painb1, FRAME_painb15, medic_frames_pain2, medic_run);
		
		//UPGRADE_NOTE: The initialization of  'medic_pain' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntPainAdapter medic_pain;
		
		//UPGRADE_NOTE: The initialization of  'medic_fire_blaster' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_fire_blaster;
		
		//UPGRADE_NOTE: The initialization of  'medic_dead' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_dead;
		
		//UPGRADE_NOTE: The initialization of  'medic_frames_death' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] medic_frames_death;
		
		internal static mmove_t medic_move_death = new mmove_t(FRAME_death1, FRAME_death30, medic_frames_death, medic_dead);
		
		//UPGRADE_NOTE: The initialization of  'medic_die' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntDieAdapter medic_die;
		
		//UPGRADE_NOTE: The initialization of  'medic_duck_down' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_duck_down;
		
		//UPGRADE_NOTE: The initialization of  'medic_duck_hold' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_duck_hold;
		
		//UPGRADE_NOTE: The initialization of  'medic_duck_up' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_duck_up;
		
		//UPGRADE_NOTE: The initialization of  'medic_frames_duck' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] medic_frames_duck;
		
		internal static mmove_t medic_move_duck = new mmove_t(FRAME_duck1, FRAME_duck16, medic_frames_duck, medic_run);
		
		//UPGRADE_NOTE: The initialization of  'medic_dodge' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntDodgeAdapter medic_dodge;
		
		//UPGRADE_NOTE: The initialization of  'medic_frames_attackHyperBlaster' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] medic_frames_attackHyperBlaster;
		
		internal static mmove_t medic_move_attackHyperBlaster = new mmove_t(FRAME_attack15, FRAME_attack30, medic_frames_attackHyperBlaster, medic_run);
		
		//UPGRADE_NOTE: The initialization of  'medic_continue' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_continue;
		
		//UPGRADE_NOTE: The initialization of  'medic_frames_attackBlaster' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] medic_frames_attackBlaster;
		
		internal static mmove_t medic_move_attackBlaster = new mmove_t(FRAME_attack1, FRAME_attack14, medic_frames_attackBlaster, medic_run);
		
		//UPGRADE_NOTE: The initialization of  'medic_hook_launch' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_hook_launch;
		
		internal static float[][] medic_cable_offsets = new float[][]{new float[]{45.0f, - 9.2f, 15.5f}, new float[]{48.4f, - 9.7f, 15.2f}, new float[]{47.8f, - 9.8f, 15.8f}, new float[]{47.3f, - 9.3f, 14.3f}, new float[]{45.4f, - 10.1f, 13.1f}, new float[]{41.9f, - 12.7f, 12.0f}, new float[]{37.8f, - 15.8f, 11.2f}, new float[]{34.3f, - 18.4f, 10.7f}, new float[]{32.7f, - 19.7f, 10.4f}, new float[]{32.7f, - 19.7f, 10.4f}};
		
		//UPGRADE_NOTE: The initialization of  'medic_cable_attack' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_cable_attack;
		
		//UPGRADE_NOTE: The initialization of  'medic_hook_retract' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_hook_retract;
		
		//UPGRADE_NOTE: The initialization of  'medic_frames_attackCable' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] medic_frames_attackCable;
		
		internal static mmove_t medic_move_attackCable = new mmove_t(FRAME_attack33, FRAME_attack60, medic_frames_attackCable, medic_run);
		
		//UPGRADE_NOTE: The initialization of  'medic_attack' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_attack;
		
		//UPGRADE_NOTE: The initialization of  'medic_checkattack' was moved to static method 'jake2.game.monsters.M_Medic'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter medic_checkattack;
		
		/*
		* QUAKED monster_medic (1 .5 0) (-16 -16 -24) (16 16 32) Ambush
		* Trigger_Spawn Sight
		*/
		public static void  SP_monster_medic(edict_t self)
		{
			if (GameBase.deathmatch.value_Renamed != 0)
			{
				GameUtil.G_FreeEdict(self);
				return ;
			}
			
			sound_idle1 = GameBase.gi.soundindex("medic/idle.wav");
			sound_pain1 = GameBase.gi.soundindex("medic/medpain1.wav");
			sound_pain2 = GameBase.gi.soundindex("medic/medpain2.wav");
			sound_die = GameBase.gi.soundindex("medic/meddeth1.wav");
			sound_sight = GameBase.gi.soundindex("medic/medsght1.wav");
			sound_search = GameBase.gi.soundindex("medic/medsrch1.wav");
			sound_hook_launch = GameBase.gi.soundindex("medic/medatck2.wav");
			sound_hook_hit = GameBase.gi.soundindex("medic/medatck3.wav");
			sound_hook_heal = GameBase.gi.soundindex("medic/medatck4.wav");
			sound_hook_retract = GameBase.gi.soundindex("medic/medatck5.wav");
			
			GameBase.gi.soundindex("medic/medatck1.wav");
			
			self.movetype = Defines.MOVETYPE_STEP;
			self.solid = Defines.SOLID_BBOX;
			self.s.modelindex = GameBase.gi.modelindex("models/monsters/medic/tris.md2");
			Math3D.VectorSet(self.mins, - 24, - 24, - 24);
			Math3D.VectorSet(self.maxs, 24, 24, 32);
			
			self.health = 300;
			self.gib_health = - 130;
			self.mass = 400;
			
			self.pain = medic_pain;
			self.die = medic_die;
			
			self.monsterinfo.stand = medic_stand;
			self.monsterinfo.walk = medic_walk;
			self.monsterinfo.run = medic_run;
			self.monsterinfo.dodge = medic_dodge;
			self.monsterinfo.attack = medic_attack;
			self.monsterinfo.melee = null;
			self.monsterinfo.sight = medic_sight;
			self.monsterinfo.idle = medic_idle;
			self.monsterinfo.search = medic_search;
			self.monsterinfo.checkattack = medic_checkattack;
			
			GameBase.gi.linkentity(self);
			
			self.monsterinfo.currentmove = medic_move_stand;
			self.monsterinfo.scale = MODEL_SCALE;
			
			GameAI.walkmonster_start.think(self);
		}
		static M_Medic()
		{
			medic_idle = new AnonymousClassEntThinkAdapter();
			medic_search = new AnonymousClassEntThinkAdapter1();
			medic_sight = new AnonymousClassEntInteractAdapter();
			medic_stand = new AnonymousClassEntThinkAdapter2();
			medic_walk = new AnonymousClassEntThinkAdapter3();
			medic_run = new AnonymousClassEntThinkAdapter4();
			medic_pain = new AnonymousClassEntPainAdapter();
			medic_fire_blaster = new AnonymousClassEntThinkAdapter5();
			medic_dead = new AnonymousClassEntThinkAdapter6();
			medic_die = new AnonymousClassEntDieAdapter();
			medic_duck_down = new AnonymousClassEntThinkAdapter7();
			medic_duck_hold = new AnonymousClassEntThinkAdapter8();
			medic_duck_up = new AnonymousClassEntThinkAdapter9();
			medic_dodge = new AnonymousClassEntDodgeAdapter();
			medic_continue = new AnonymousClassEntThinkAdapter10();
			medic_frames_attackBlaster = new mframe_t[]{new mframe_t(GameAI.ai_charge, 0, null), new mframe_t(GameAI.ai_charge, 5, null), new mframe_t(GameAI.ai_charge, 5, null), new mframe_t(GameAI.ai_charge, 3, null), new mframe_t(GameAI.ai_charge, 2, null), new mframe_t(GameAI.ai_charge, 0, null), new mframe_t(GameAI.ai_charge, 0, null), new mframe_t(GameAI.ai_charge, 0, null), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, null), new mframe_t(GameAI.ai_charge, 0, null), new mframe_t(GameAI.ai_charge, 0, medic_fire_blaster), new mframe_t(GameAI.ai_charge, 0, null), new mframe_t(GameAI.ai_charge, 0, medic_continue)};
			medic_hook_launch = new AnonymousClassEntThinkAdapter11();
			medic_cable_attack = new AnonymousClassEntThinkAdapter12();
			medic_hook_retract = new AnonymousClassEntThinkAdapter13();
			medic_attack = new AnonymousClassEntThinkAdapter14();
			medic_checkattack = new AnonymousClassEntThinkAdapter15();
		}
	}
}